<div class="page" v-loading="taskHistoryDetailLoading">
    <div class="page-header">
        <div class="page-title"><i class="iconfont icon-detail"></i> 历史任务详情</div>
        <div class="page-breadcrumb">
            <el-breadcrumb separator="/">
                <el-breadcrumb-item :to="{path:'/dashboard'}">Home</el-breadcrumb-item>
                <el-breadcrumb-item :to="{path:'/task/history/list'}">历史任务</el-breadcrumb-item>
                <el-breadcrumb-item>历史任务详情</el-breadcrumb-item>
            </el-breadcrumb>
        </div>
    </div>
    <div class="page-body" v-show="!taskHistoryDetailLoading">
        <h4 class="no-margin">{{taskHistoryDetail.group}}.{{taskHistoryDetail.name}}</h4>
        <div class="hr"></div>
        <el-row>
            <el-col :span="7">
                <div class="info-item"><span class="info-item-label">任务组件: </span><span class="info-item-content">{{taskHistoryDetail.execModule}}</span></div>
                <div class="info-item"><span class="info-item-label">执行状态: </span><span class="info-item-content"><span :class="{'text-success':taskHistoryDetail.execState == 'SUCCESS','text-warning text-bold':taskHistoryDetail.execState == 'VETOED','text-danger text-bold':taskHistoryDetail.execState == 'FAIL'}">{{taskHistoryDetail.execState}}</span></span></div>
                <div class="info-item"><span class="info-item-label">触发方式: </span><span class="info-item-content">{{taskHistoryDetail.firedWay}}</span></div>
                <div class="info-item"><span class="info-item-label">触发时间: </span><span class="info-item-content">{{$moment(taskHistoryDetail.firedTime).format("YYYY-MM-DD HH:mm:ss")}}</span></div>
            </el-col>
            <el-col :span="17">
                <div class="info-item"><span class="info-item-label">FireId: </span><span class="info-item-content">{{taskHistoryDetail.fireId}}</span></div>
                <div class="info-item"><span class="info-item-label">执行实例: </span><span class="info-item-content">{{taskHistoryDetail.instanceId}}</span></div>
                <div class="info-item"><span class="info-item-label">耗时: </span><span class="info-item-content"><span :class="{'text-danger text-bold':taskHistoryDetail.expendTime > 500}">{{taskHistoryDetail.expendTime}}ms</span></span></div>
            </el-col>
        </el-row>

        <div class="spr spr-x"></div>

        <h4 class="no-margin">任务日志</h4>
        <div class="hr"></div>
        <pre class="log" v-html="formatLogContent(taskHistoryDetail.log)"></pre>
        <el-backtop target=".page-body"></el-backtop>
    </div>
</div>